/*
 * @Description:
 * @Author: qingyang
 * @Date: 2022-01-11 19:05:29
 * @LastEditors: qingyang
 * @LastEditTime: 2023-06-25 18:02:18
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'
// vuex
import { store } from '@/store'
// element
import ElementPlus from 'element-plus'
//自定义指令
import { setupDirectives } from '@/directives/index'
import { setupRouterGuard } from '@/router/guard/index'
// 中英转换
import setupLanguage from '@/locales'
import '@/assets/iconfont/iconfont.js'
// a modern alternative to CSS resets
import 'normalize.css/normalize.css'
import '@/assets/fonts/index.scss'

import '@/assets/styles/index.scss'
import '@xfchenju/vxe-table/styles/index.scss'
import { getI18nName, fixedInit } from './utils'
fixedInit()
import VXETable from '@xfchenju/vxe-table'
import '@/assets/styles/vxe/index.scss'
import CPlus from '@xfchenju/c-plus'
import '@xfchenju/c-plus/theme-chalk/css/index.css'

const app = createApp(App)
setupLanguage(app)
setupDirectives(app)
app.config.globalProperties.$t18 = getI18nName

app.use(ElementPlus)
app.use(CPlus)
// 路由守卫
setupRouterGuard(router)
app.use(VXETable)
app.use(router).use(store).mount('#app')
